#ifndef __USART1_H__
#define __USART1_H__

#include "stm32f10x_conf.h"

#define N 100

typedef uint8_t u8;

typedef struct student {
	u8 id;
	u8 age;
	char name[32];
} student;

extern void usart1_init(void);

extern void usart1_send_byte(u8 data);

extern void usart1_send_str(const char *str);

extern void usart1_send_struct(const student *st);

extern u8 usart1_recv_byte(void);

extern char *usart1_recv_str(char *str, u8 max_len);

#endif
